package com.an.blog.admin.domain.bo;

import com.an.common.core.domain.BaseEntity;
import com.an.common.core.validate.AddGroup;
import com.an.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 博客评论业务对象 blog_comment
 *
 * @author Ann
 * @date 2023-05-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class BlogCommentBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long commentId;

    /**
     * 评论人id
     */
    @NotNull(message = "评论人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 评论内容
     */
    private String commentContent;

    /**
     * 关联的1级评论id，如果是一级，则为0
     */
    private Long parentId;

    /**
     * 回复评论人id
     */
    private Long answerId;

    /**
     * 评论主题（0文章 1说说）
     */
    private String topic;

    /**
     * 评论主题id
     */
    private Long topicId;

    /**
     * ip地址
     */
    private String ipAddress;

    /**
     * ip属地
     */
    private String ipSource;

    /**
     * 状态（0正常 1停用）
     */
    @NotBlank(message = "状态（0正常 1停用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 点赞数量
     */
    @NotNull(message = "点赞数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long likedCount;


}
